package com.ruoyi.system.xmlAbstract.interfaces.templateInterfaces.impl;


import com.ruoyi.system.xmlAbstract.XmlGenerateAbstract;
import com.ruoyi.system.xmlAbstract.impl.XmlBuild;
import com.ruoyi.system.xmlAbstract.interfaces.templateInterfaces.XmlTemplateInterface;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @author : anxinr
 * @date : 2023/1/16 11:42
 */
@Scope("prototype")
@Component(value = "PublicXmlTemplate")
public class PublicXmlTemplate implements XmlTemplateInterface {
    @Override
    public XmlGenerateAbstract generateXmlTemplate() throws Exception {
        XmlBuild xmlBuild = new XmlBuild();
        xmlBuild.generateRootNode("ap");
        xmlBuild.generateChildNode("CCTransCode");
        xmlBuild.generateChildNode("ProductID");
        xmlBuild.generateChildNode("ChannelType");
        xmlBuild.generateChildNode("CorpNo");
        xmlBuild.generateChildNode("OpNo");
        xmlBuild.generateChildNode("AuthNo");
        xmlBuild.generateChildNode("ReqSeqNo");
        xmlBuild.generateChildNode("ReqDate");
        xmlBuild.generateChildNode("ReqTime");
        xmlBuild.generateChildNode("Sign");
        xmlBuild.setCurrentNodeToRootNode();
        return xmlBuild;
    }
}
